<?php

$config = [
    'id' => 'etcp',
    'basePath' => dirname(dirname(__DIR__)),
    'language' => 'zh-CN',
    'bootstrap' => ['log'],
    'timeZone' => 'Asia/Shanghai',//时区设置
    'modules' => [
        'user' => [
            'class' => 'app\modules\user\Module',
        ],
        'common' => [
            'class' => 'app\modules\common\Module',
        ],
    ],
    'components' => [
        'request' => [
            'cookieValidationKey' => 'dmpisthebest',
        ],
        'cache' => [
            'class' => 'yii\caching\FileCache',
        ],
        'mailer' => require(__DIR__ . '/mailer.php'),
        'errorHandler' => [
            'errorAction' => 'site/error',
        ],
        'log' => [
            'traceLevel' => YII_DEBUG ? 10 : 0,
            'targets' => [
                [
                    'class'        => 'yii\log\FileTarget',
                    'logFile'      => './data/logs/' . date('Ymd') . '.log',
                    'levels'       => ['error', 'warning', 'info'],
                    'maxFileSize'  => '1024000',
                    'rotateByCopy' => false
                ],
            ],
        ],
        'urlManager' => [
            'enablePrettyUrl' => true,
            'showScriptName' => false,
        ],
    ],
];

return $config;
